Use the HYPERVISOR_block now, after adding a check if there's RCU work.
{
u64 alarm = 0;
int ret = 0;
+ int cpu = smp_processor_id();
spin_lock(&timerlist_lock);
*/
alarm = __jiffies_to_st(next_timer_interrupt());
-#if 0
- /* Tasks on the timer task queue expect to be executed on the next tick. */
- if ( TQ_ACTIVE(tq_timer) )
- alarm = __jiffies_to_st(jiffies + 1);
-#endif
-
/* Failure is pretty bad, but we'd best soldier on. */
if ( HYPERVISOR_set_timer_op(alarm) != 0 )
ret = -1;
void xen_cpu_idle (void)
{
local_irq_disable();
- if (need_resched()) {
+ if (need_resched() || !list_empty(&RCU_curlist(cpu)))
local_irq_enable();
return;
}
- if (0 && set_timeout_timer() == 0) {
+ if (set_timeout_timer() == 0) {
/* NB. Blocking reenable events in a race-free manner. */
HYPERVISOR_block();
return;